package c1762;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.StringTokenizer;

public class C {
    static int[] Q = new int[100000 * 2 + 400];
    static int head = 0, tail = -1;

    public static void main(String[] args) {
        QuickInput cin = new QuickInput();
        int n = cin.nextInt();
        for (int i = 0; i < n; i++) {
            Q[++tail] = cin.nextInt();
        }
        while (head <= tail) {
            System.out.print(Q[head++] + " ");
            if (head < tail) {
                int x = Q[head++];
                Q[++tail] = x;

            }
        }
        System.out.println();


    }
    static class QuickInput {
        BufferedReader buf;
        StringTokenizer tok;

        QuickInput() {
            buf = new BufferedReader(new InputStreamReader(System.in));
        }

        boolean hasNext() {
            while (tok == null || !tok.hasMoreElements()) {
                try {
                    tok = new StringTokenizer(buf.readLine());
                } catch (Exception e) {
                    return false;
                }
            }
            return true;
        }

        String next() {
            if (hasNext()) return tok.nextToken();
            return null;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        BigInteger nextBigInteger() {
            return new BigInteger(next());
        }

        BigDecimal nextBigDecimal() {
            return new BigDecimal(next());
        }
    }

}

